<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Mouse Event Listener</title>
</head>
<body>
    <div id="app">
        <p>鼠标位置: {{ x }}, {{ y }}</p>
    </div>

    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script type="module">
        // 在浏览器环境中，使用 type="module" 并直接导入
        import { useMouse } from './main.js'

        const { createApp } = Vue

        createApp({
            setup() {
                const { x, y } = useMouse()
                return { x, y }
            }
        }).mount('#app')
    </script>
</body>
</html>

